fillsinks
fillsinks(G::GMTgrid; conn=8, region=nothing, saco=false, insitu=false)
Fill sinks in a grid.
This function uses the imfill function to find how to fill sinks in a grid. But since imfill operates on UInt8 matrices only the vertical (z) descrimination of the grid is reduced to 256 levels, which is not that much.
Args
G::GMTgrid: The input grid to process.
Kwargs
conn::Int: Connectivity for sink filling (4 or 8). Default is 8.
region: Limit the action to a region of the grid specified byregion. See for example the coast manual for and extended doc on this keword, but note that here onlyregionis accepted and notR, etc...
Returns
A new GMTgrid with sinks filled.
Examples
Fill the depressions of the peaks surface. Show original and sinks filled side by side.
using GMT
G = peaks(N=128);
G2 = fillsinks(G);
grdimage(G, figsize=6, shade=true)
grdimage!(G2, figsize=6, xshift=6.2, frame="wSen", shade=true, show=true)
See Also
imfill
© GMT.jl. Last modified: November 02, 2025. Website built with Franklin.jl and the Julia programming language.
These docs were autogenerated using GMT: v1.33.1